package com.v.im.businessapi.feign;


import com.v.im.businessapi.api.ImMessageServiceAPI;
import com.v.im.businessapi.dto.paramDTO.ImMessageParamDTO;
import com.v.im.commonmodule.utils.constants.InterfaceService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;


/**
 *  聊天信息 客户端
 */

@FeignClient(name = InterfaceService.BUSINESS_SERVICE_NAME,
        fallback = ImMessageClientService.HystrixClientFallback.class)
public interface ImMessageClientService extends ImMessageServiceAPI {

    @Slf4j
    @Component
    class HystrixClientFallback implements ImMessageClientService {

        @Override
        public void saveImMessageInfo(ImMessageParamDTO imMessageParamDTO) {
            log.error("调用保存信息服务失败");
        }
    }
}
